package com.lgx.mobile.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.TableGenerator;
import com.lgx.common.entity.IdGenerator;

/**
 * @author xuyichen
 * 
 * 好友
 *
 */
@Entity
@Table(name = "TM_M_FRIEND")
public class Friend implements Serializable {
	
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator=IdGenerator.TM_M_FRIEND_ID)
	@TableGenerator(
			name = IdGenerator.TM_M_FRIEND_ID,
			table = IdGenerator.GENERATOR_TABLE,
			pkColumnName = IdGenerator.GEN_NAME,
			pkColumnValue = IdGenerator.TM_M_FRIEND_ID,
			valueColumnName = IdGenerator.GEN_VALUE,
			initialValue = 1,
			allocationSize = 1
	)
	private long id;
	
	/**
	 * 所属用户ID
	 */
	@Column(name = "onwer_user_id")
	private long onwerUserId;
	
	/**
	 * 好友ID
	 */
	@Column(name = "friend_user_id")
	private long friendUserId;
	
	/**
	 * 好友类型
	 * 1--好友，2--黑名单
	 */
	private String type;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public long getOnwerUserId() {
		return onwerUserId;
	}

	public void setOnwerUserId(long onwerUserId) {
		this.onwerUserId = onwerUserId;
	}

	public long getFriendUserId() {
		return friendUserId;
	}

	public void setFriendUserId(long friendUserId) {
		this.friendUserId = friendUserId;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
}
